#include "OpenGLCommon.h"

#ifndef _OPENGL_VERTEXBUFFER_H_
#define _OPENGL_VERTEXBUFFER_H_

namespace Hiranipra {
	namespace Platform {
		namespace Graphics {

			class VertexBuffer : implements IVertexBuffer
			{
			public:
				VertexBuffer( const BufferFlags flags, VertexDeclaration* vertexDecl, const uint32 elementCount, const void* buffer = NULL );
				virtual ~VertexBuffer();

				GLuint GetBufferID() const { return _bufferId; }

			public:
				virtual bool Upload();
				virtual bool GetData( void* buffer, uint32 startIndex, uint32 elementCount ) const;
				virtual void SetData( const void* buffer, uint32 startIndex, uint32 elementCount, bool discard );

			private:
				GLuint		_bufferId;
			};

		}
	}
}

#endif // _OPENGL_VERTEXBUFFER_H_
